﻿using Website.Interfaces;

namespace Website.Infrastructure
{
    public class AndroidDeviceDetector : IDeviceDetector
    {
        private string _userAgent;

        public AndroidDeviceDetector(string userAgent)
        {
            _userAgent = userAgent;
        }

        public bool IsPhoneDevice()
        {
            return _userAgent.Contains("Mobile ");
        }

        public bool IsTabletDevice()
        {
            return !IsPhoneDevice();
        }
    }
}